<template>
	<view class="container">
		<u-navbar :autoBack="true" :title="title" placeholder bgColor="transparent"></u-navbar>
		<view class="pad-30">
			<u-parse :content="content"></u-parse>
		</view>
	</view>
</template>

<script>
	// 接口地址
	import {
		configIndex
	} from '@/config/api.js'
	export default {
		data() {
			return {
				// 富文本
				content: '',
				// 请求参数
				code: [],
				//  title
				title: ""
			}
		},
		onLoad(options) {
			this.code = options.code;
			this.title  =  options.text;
			this.getData();
		},
		methods: {
			getData() {
				configIndex({
					code_arr: [this.code]
				}).then(res => {
					this.content = res.data[this.code];
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		min-height: 100vh;

		::v-deep .u-navbar__content {
			background-image: url('../../static/image/my-bg.png');
			background-size: cover;
			background-repeat: no-repeat;
			background-color: #f5f5f5;
		}
	}
</style>